package org.thoughtworks.selenium.flex.codec;

import java.util.HashMap;
import java.util.Map;

public class KeyCodeFactory {

    private static final Map<Integer, KeyCode> KEY_CODE_MAP = new HashMap<Integer, KeyCode>();

    static {
        for (KeyCode keyCode : KeyCode.values())
            KEY_CODE_MAP.put(keyCode.value(), keyCode);
    }

    public static KeyCode get(String keyCode) {
        return KEY_CODE_MAP.get(keyCode);
    }
}
